-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Use correct slot for COUNTKEYSINSLOT command #3327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khasanovbi thank you for the contribution! Are there other commands that need to be executed on the args[2]
slot? If so, let's prepare a slice and check if the arg[1]
is in this list. Also, let's add tests for the change.
0c0aa56
to
bb7c519
Compare
Hi @ndyakov I'm checked other commands in docs and don't think that there are other commands that should use slot from command arg. About the tests, I found ClusterGetKeysInSlot, ClusterCountKeysInSlot tests in osscluster_test.go only. |
Hey @khasanovbi , I would expect to see a unit test for |
5fdadc8
to
edfcfee
Compare
Fixed |
@khasanovbi thank you. Can you please add a brief description for the PR. I think the rest looks good. |
Done |
Added selection of the correct slot for the CLUSTER COUNTKEYSINSLOT command based on the argument.
This allows to make a request for the number of keys in a slot not for all shards, but for the necessary one.